home *** CD-ROM | disk | FTP | other *** search
/ The History of Denim / The History of Denim.iso / pc / _mills.dir / 00002_Utilities.ls < prev    next >
Encoding:
Text File  |  1997-11-18  |  1.8 KB  |  58 lines

  1. on GeographyRoll
  2.   global BigList, Countries
  3.   set TestCoords to [rect(313, 164, 329, 183), rect(560, 153, 595, 199), rect(248, 160, 276, 180), rect(289, 120, 302, 146), rect(273, 120, 286, 146), rect(289, 150, 310, 180), rect(110, 253, 135, 274), rect(135, 267, 211, 336), rect(115, 292, 132, 309), rect(135, 242, 153, 260), rect(37, 200, 100, 243), rect(489, 255, 602, 288), rect(10, 139, 134, 194)]
  4.   repeat with n = 1 to count(TestCoords)
  5.     if inside(point(the mouseH, the mouseV), getAt(TestCoords, n)) then
  6.       NewPallette_Mills()
  7.       set temp to getAt(BigList, n)
  8.       sort(temp)
  9.       tell window "Mills_Navigation"
  10.         UpdateMill(temp, getAt(Countries, n))
  11.       end tell
  12.       exit
  13.     end if
  14.   end repeat
  15. end
  16.  
  17. on buttonRoll
  18.   global BigList, Countries
  19.   if inside(point(the mouseH, the mouseV), rect(348, 340, 564, 386)) then
  20.     NewPallette_Mills()
  21.     set hugelist to [" Mills Map": "Main"]
  22.     repeat with a = 1 to count(BigList)
  23.       set MyItem to getAt(BigList, a)
  24.       repeat with b = 2 to count(MyItem)
  25.         addProp(hugelist, getPropAt(MyItem, b), getAt(MyItem, b))
  26.       end repeat
  27.     end repeat
  28.     sort(hugelist)
  29.     tell window "Mills_Navigation"
  30.       UpdateMill(hugelist, "Select Location")
  31.     end tell
  32.     exit
  33.   end if
  34. end
  35.  
  36. on CursorRoll WhoAmi, Myrects
  37.   if the frontWindow = WhoAmi then
  38.     repeat with C = 1 to count(Myrects)
  39.       if inside(point(the mouseH, the mouseV), getAt(Myrects, C)) then
  40.         cursor([member "hand", member "handmask"])
  41.         next repeat
  42.       end if
  43.       cursor(0)
  44.     end repeat
  45.   end if
  46. end
  47.  
  48. on mouseDown
  49.   if the frameLabel = "Main" then
  50.     if inside(point(the mouseH, the mouseV), rect(345, 351, 563, 386)) then
  51.       puppetSprite(50, 1)
  52.       set the memberNum of sprite 50 to member "mills_list_click"
  53.       set the rect of sprite 50 to rect(345, 351, 563, 386)
  54.       updateStage()
  55.     end if
  56.   end if
  57. end
  58.